package com.cskaoyan.bean.pojo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.sql.Clob;
import java.util.Date;


@Data
public class Goods {

    private Integer id;

    @Pattern(regexp = "^[1-9]\\d{0,8}", message = "商品编号为1-9位正整数")
    private String goodsSn;

    private String name;

    private Integer categoryId;

    private Integer brandId;

    private String[] gallery;
    private String keywords;
    private String brief;
    private Boolean isOnSale;

    private Short sortOrder;

    private String picUrl;

    private String shareUrl;

    private Boolean isNew;

    private Boolean isHot;

    private String unit;
    @Min(value = 0)
    private BigDecimal counterPrice;
    @Min(value = 0)
    private BigDecimal retailPrice;

    private Date addTime;

    private Date updateTime;

    private Boolean deleted;

    private String detail;


}